package entity;

import entity.Employee;

import java.io.Serializable;
import java.util.List;

import javax.inject.Named;
import javax.persistence.*;


/**
 * Entity implementation class for Entity: Contractor
 *
 */
@Named(value="contractor")
@Entity
@DiscriminatorValue("C")
public class Contractor extends Employee implements Serializable {

	
	private static final long serialVersionUID = 1L;

	private float hourly_rate;
	@OneToMany(mappedBy="contractor",cascade=CascadeType.REMOVE)
	private List<TimeCard> timeCards;
	
	public Contractor(String codfisc, String name, String surname, String username, String password,
			float hourly_rate) {
		super(codfisc, name, surname, username, password);
		this.hourly_rate = hourly_rate;
		
	}

	public float getHourly_rate() {
		return hourly_rate;
	}

	public void setHourly_rate(float hourly_rate) {
		this.hourly_rate = hourly_rate;
	}

	public Contractor() {
		super();
	}

	public List<TimeCard> getTimeCards() {
		return timeCards;
	}

	public void setTimeCards(List<TimeCard> timeCards) {
		this.timeCards = timeCards;
	}
   
}
